#ifndef OPEN_COUNT_H_ 
#define OPEN_COUNT_H_ 

#include "zf_common_typedef.h"
#include "motor_driver.h"
#include "imu_driver.h"

typedef enum
{
    start = 0,
    end = 1,
}state_t; 


struct open_count_S
{
    float num;
    state_t state;

};

struct open_count_type_S
{
    struct open_count_S angle;
    struct open_count_S distance;
    struct open_count_S time;
    uint8 step_flag;
    uint8 banma_flag;
    uint8 ok_long;
    float open_v_yaw;
};

extern int danbianqiaosudu;
extern float danbianqiaozhongjuli;
extern float tiaoyuejuli;
extern int kanyuan;
extern int tiaoyuedian;

extern struct open_count_type_S open_count;

void open_count_start(struct open_count_S *self);
void open_count_end(struct open_count_S *self);

void open_count_loop_all(struct open_count_type_S *self);
void open_count_all_init(struct open_count_type_S *self);

#endif
